home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / necko / nsINetUtil.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  3KB  |  103 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsINetUtil.idl
  3.  */
  4.  
  5. #ifndef __gen_nsINetUtil_h__
  6. #define __gen_nsINetUtil_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsINetUtil */
  19. #define NS_INETUTIL_IID_STR "f0c5dddb-4713-4603-af2d-bf671838996b"
  20.  
  21. #define NS_INETUTIL_IID \
  22.   {0xf0c5dddb, 0x4713, 0x4603, \
  23.     { 0xaf, 0x2d, 0xbf, 0x67, 0x18, 0x38, 0x99, 0x6b }}
  24.  
  25. /**
  26.  * nsINetUtil provides various network-related utility methods.
  27.  */
  28. class NS_NO_VTABLE nsINetUtil : public nsISupports {
  29.  public: 
  30.  
  31.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_INETUTIL_IID)
  32.  
  33.   /**
  34.    * Parse a content-type header and return the content type and
  35.    * charset (if any).
  36.    *
  37.    * @param aTypeHeader the header string to parse
  38.    * @param [out] aCharset the charset parameter specified in the
  39.    *              header, if any.
  40.    * @param [out] aHadCharset whether a charset was explicitly specified.
  41.    * @return the MIME type specified in the header, in lower-case.
  42.    */
  43.   /* AUTF8String parseContentType (in AUTF8String aTypeHeader, out AUTF8String aCharset, out boolean aHadCharset); */
  44.   NS_IMETHOD ParseContentType(const nsACString & aTypeHeader, nsACString & aCharset, PRBool *aHadCharset, nsACString & _retval) = 0;
  45.  
  46. };
  47.  
  48. /* Use this macro when declaring classes that implement this interface. */
  49. #define NS_DECL_NSINETUTIL \
  50.   NS_IMETHOD ParseContentType(const nsACString & aTypeHeader, nsACString & aCharset, PRBool *aHadCharset, nsACString & _retval); 
  51.  
  52. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  53. #define NS_FORWARD_NSINETUTIL(_to) \
  54.   NS_IMETHOD ParseContentType(const nsACString & aTypeHeader, nsACString & aCharset, PRBool *aHadCharset, nsACString & _retval) { return _to ParseContentType(aTypeHeader, aCharset, aHadCharset, _retval); } 
  55.  
  56. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  57. #define NS_FORWARD_SAFE_NSINETUTIL(_to) \
  58.   NS_IMETHOD ParseContentType(const nsACString & aTypeHeader, nsACString & aCharset, PRBool *aHadCharset, nsACString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ParseContentType(aTypeHeader, aCharset, aHadCharset, _retval); } 
  59.  
  60. #if 0
  61. /* Use the code below as a template for the implementation class for this interface. */
  62.  
  63. /* Header file */
  64. class nsNetUtil : public nsINetUtil
  65. {
  66. public:
  67.   NS_DECL_ISUPPORTS
  68.   NS_DECL_NSINETUTIL
  69.  
  70.   nsNetUtil();
  71.  
  72. private:
  73.   ~nsNetUtil();
  74.  
  75. protected:
  76.   /* additional members */
  77. };
  78.  
  79. /* Implementation file */
  80. NS_IMPL_ISUPPORTS1(nsNetUtil, nsINetUtil)
  81.  
  82. nsNetUtil::nsNetUtil()
  83. {
  84.   /* member initializers and constructor code */
  85. }
  86.  
  87. nsNetUtil::~nsNetUtil()
  88. {
  89.   /* destructor code */
  90. }
  91.  
  92. /* AUTF8String parseContentType (in AUTF8String aTypeHeader, out AUTF8String aCharset, out boolean aHadCharset); */
  93. NS_IMETHODIMP nsNetUtil::ParseContentType(const nsACString & aTypeHeader, nsACString & aCharset, PRBool *aHadCharset, nsACString & _retval)
  94. {
  95.     return NS_ERROR_NOT_IMPLEMENTED;
  96. }
  97.  
  98. /* End of implementation class template. */
  99. #endif
  100.  
  101.  
  102. #endif /* __gen_nsINetUtil_h__ */
  103.